<?php
/**
 * Created by PhpStorm.
 * User: changyifan
 * Date: 2018/4/3
 * Time: 下午3:56
 */

namespace Home\Dao;
use Think\Model\BaseDao;

class StuTcDao extends BaseDao{









    public function check_student($chk_value){

        $list = $chk_value;
        $flag = true;
        foreach($list as $key => $value){
            $arr = explode(',',$value);
            $info = $this -> where(array('stu_id'=> $arr[0],'tc_id'=>$arr[1]))-> setField('stu_tc_status',2);
            $flag = $info ? true:false;
        }
        if($flag){
            $result['state'] = true;
            $result['info'] = '审核成功';
        }else{
            $result['state'] = false;
            $result['info'] = '部分审核失败，请刷新页面后重试';
        }
        return $result;
    }

}